// 显示星期几 switch
#include <stdio.h>

int main(int argc, char **argv)
{
    int week = 0;

    // 交互
    printf("输入:  \n");
    scanf("%d", &week);

    // 错误判断
    if(week <= 0 || week > 7)
    {
        perror("error");
        return -1;
    }

    // 判断
    switch (week)
    {
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:
            printf("工作日\n");
            break;

        case 6:
        case 7:
            printf("休息日\n");
            break;
        
        default:
            break;
    }
    return 0;
}